home *** CD-ROM | disk | FTP | other *** search
- /*
- Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New
- York. Permission is granted to any individual or institution to use this
- software as long as it is not sold for profit. This copyright notice must be
- retained. This software may not be included in commercial products without
- written permission of Columbia University.
- */
- #define TE_TOOBIG 32000 /* should be less than 32k-1 */
- #define TE_TRIM 512 /* should be some approiate size */
- #define TE_MAX 32767 /* the maximum size of text in a TE buffer */
-
- /*
- * TE window structure
- */
- struct cmdw {
- struct cmdw *next; /* pointer to next in list */
- WindowPtr window; /* the WindowPtr */
- WindowRecord WRec; /* store window stuff here */
- ControlHandle vscroll;
- ControlHandle hscroll;
- Rect teviewr;
- TEHandle teh;
- Point theorigin;
- short refNum; /* file refNum if file opened */
- short vRefNum; /* vol ref num for file */
- char *fName; /* file name (pascal string) */
- char *wname; /* window name (pascal string) */
- int menuitem; /* item number in Windows menu */
- unsigned short flags; /* flags */
- int id; /* id of this cmdw */
- };
-
- /*
- * Flags field.
- */
- #define CMDWF_FOPEN 0x0001 /* opened with fopen */
- #define CMDWF_FILE 0x0002 /* window points to a file */
- #define CMDWF_MODIFIED 0x0004 /* buffer is modified */
-
- /*
- * function prototypes.
- */
- struct cmdw *initcmdw();
-
- /*
- * Externals
- */
- extern struct cmdw *rcmdw; /* remote command window */
- extern struct cmdw *lcmdw; /* local command window */
- extern int cmdinterminal;
-
- /*
- * ckmwin.c prototypes
- */
- extern struct cmdw *initcmdw(int id, int vscroll, int hscroll);
- extern int sizescrollbars(struct cmdw *cmdw);
- extern int sizeteviewr(struct cmdw *cmdw);
- extern void growremwindow(struct cmdw *cmdw, Point p);
- extern int rcmdwhide(struct cmdw *cmdw);
- extern int rrcmdwshow(void);
- extern int rcmdwshow(struct cmdw *cmdw);
- extern int rcdactivate(struct cmdw *cmdw, int mod);
- extern pascal void rdoscroll(ControlHandle WHICHCONTROL, short THECODE);
- extern int rcdkey(struct cmdw *cmdw, EventRecord *evt);
- extern int rcdmouse(struct cmdw *cmdw, EventRecord *evt);
- extern int rcd_cut(struct cmdw *cmdw);
- extern int rcd_copy(struct cmdw *cmdw);
- extern int rcd_paste(struct cmdw *cmdw);
- extern int rcd_clear(struct cmdw *cmdw);
- extern int rcdupdate(struct cmdw *cmdw);
- extern int scrollbits(struct cmdw *cmdw);
- extern int rcdwscroll(struct cmdw *cmdw);
- extern int pagescroll(struct cmdw *cmdw, int code, int amount,
- ControlHandle ctrlh);
- extern int setscrollmax(struct cmdw *cmdw);
- extern void cmdout(char);
- extern void kSelectWindow(WindowPtr);
-
-
-
-